<h1>Editing <%= @category.name %></h1>
<% form_for(@category, :url=>{:action=>'update'}) do |c| %>
  <div id="edit_category">
    <p><b>Name</b><br /><%= c.text_field :name, :class => "textInput" %> </p>
    <p>
      <strong>User Level</strong>
      <br/>
      <select name="category[user_level_rule_id]" class="textInput">
        <% @user_level_rules.each do |ulr| %>
          <% if @category.user_level_rule_id == ulr.id %>
            <option selected="selected" value="<%= ulr.id %>"><%= ulr.name %></option>
          <% else %>
            <option value="<%= ulr.id %>"><%= ulr.name %></option>
          <% end %>
        <% end %>
      </select>
    </p>
    <p><br /><%= c.submit "Update", :class => "button" %> </p>
  </div>
  <a href="/admin/categoies/panel/" class="button">All Categories</a>
<% end %>